package cn.com.miao.lynx.service.system.mapping;

import cn.com.miao.lynx.common.base.mapping.TreeMapStructMapping;
import cn.com.miao.lynx.common.base.vo.BaseTreeVo;
import cn.com.miao.lynx.service.system.entity.SysDict;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 * SysDictMapping
 *
 * @title: SysDictMapping
 * @description:
 * @author: dengmiao
 * @create: 2019-12-31 15:12
 **/
@Mapper(componentModel = "spring")
public interface SysDictMapping extends TreeMapStructMapping<SysDict, Long> {

    @Mappings({
            @Mapping(target = "key", source = "id"),
            @Mapping(target = "title", source = "dictName")
    })
    @Override
    BaseTreeVo toTreeVo(SysDict source);
}
